<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>headset.util.Saver.ArchiveSaver</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="headset-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >HeaDSET</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="headset-module.html">Package&nbsp;headset</a> ::
        <a href="headset.util-module.html">Package&nbsp;util</a> ::
        <a href="headset.util.Saver-module.html">Module&nbsp;Saver</a> ::
        Class&nbsp;ArchiveSaver
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class ArchiveSaver</h1><p class="nomargin-top"><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver">source&nbsp;code</a></span></p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      The constructor, create a default temp file to save in</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#__del__" class="summary-sig-name">__del__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Destructor, if we're still working in a temp file: remove it.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.__del__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#SetSavePath" class="summary-sig-name">SetSavePath</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">path</span>)</span><br />
      Set the path to the file that should be used for saving &amp; 
      loading.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.SetSavePath">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#SaveXML" class="summary-sig-name">SaveXML</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">XML</span>)</span><br />
      Save XML describing state to archive</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.SaveXML">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#LoadXML" class="summary-sig-name">LoadXML</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Try to load XML from file at current savePath</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.LoadXML">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#AddDicom" class="summary-sig-name">AddDicom</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">path</span>)</span><br />
      add dicom data to save file</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.AddDicom">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#LoadDicom" class="summary-sig-name">LoadDicom</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Load dicom files from tar file they are extracted to 
      self.programPath/tmp/dicom, for you to do what you want with them.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.LoadDicom">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#HasDicom" class="summary-sig-name">HasDicom</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Does the savefile contain dicom data?</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.HasDicom">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#AddRecording" class="summary-sig-name">AddRecording</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>,
        <span class="summary-sig-arg">filename</span>)</span><br />
      Add a recording to the savefile</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.AddRecording">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#ListRecordings" class="summary-sig-name">ListRecordings</a>(<span class="summary-sig-arg">self</span>)</span><br />
      List all recordings in savefile</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.ListRecordings">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#LoadRecording" class="summary-sig-name">LoadRecording</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span><br />
      Get recording data from the savefile.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.LoadRecording">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#_File2String" class="summary-sig-name" onclick="show_private();">_File2String</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tarName</span>)</span><br />
      Read data from file in savefile to string</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver._File2String">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#Delete" class="summary-sig-name">Delete</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Delete saveFile, start over fresh.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.Delete">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#Reset" class="summary-sig-name">Reset</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Reset to new, blank temporary file</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.Reset">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#IsTemp" class="summary-sig-name">IsTemp</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns:
      Are we saving to a temp file right now?</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.IsTemp">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#_AddToSaveFile" class="summary-sig-name" onclick="show_private();">_AddToSaveFile</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">path</span>,
        <span class="summary-sig-arg">arcname</span>=<span class="summary-sig-default">None</span>)</span><br />
      Add a file or dir to the saveFile (tar archive)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver._AddToSaveFile">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#_SaveHasFile" class="summary-sig-name" onclick="show_private();">_SaveHasFile</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">path</span>)</span><br />
      Does the save file contain the file indicated by path?</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver._SaveHasFile">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#_ClearTemp" class="summary-sig-name" onclick="show_private();">_ClearTemp</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver._ClearTemp">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="headset.util.Saver.ArchiveSaver-class.html#_CreateTempFile" class="summary-sig-name" onclick="show_private();">_CreateTempFile</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver._CreateTempFile">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>The constructor, create a default temp file to save in</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="__del__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__del__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Destructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.__del__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Destructor, if we're still working in a temp file: remove it.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="SetSavePath"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">SetSavePath</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">path</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.SetSavePath">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Set the path to the file that should be used for saving &amp; 
  loading.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>path</code></strong> - path to file, e.g. /home/simon/klaasjan.hdt</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="SaveXML"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">SaveXML</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">XML</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.SaveXML">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Save XML describing state to archive</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>XML</code></strong> - String containing xml to be saved</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="LoadXML"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">LoadXML</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.LoadXML">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Try to load XML from file at current savePath</p>
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>String, nothing if loading failed</dd>
  </dl>
</td></tr></table>
</div>
<a name="AddDicom"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">AddDicom</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">path</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.AddDicom">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>add dicom data to save file</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="LoadDicom"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">LoadDicom</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.LoadDicom">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Load dicom files from tar file they are extracted to 
  self.programPath/tmp/dicom, for you to do what you want with them. If 
  there are files there already, they are deleted.</p>
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>boolean, indicating if loading was successful</dd>
  </dl>
</td></tr></table>
</div>
<a name="HasDicom"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">HasDicom</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.HasDicom">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Does the savefile contain dicom data?</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="AddRecording"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">AddRecording</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">data</span>,
        <span class="sig-arg">filename</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.AddRecording">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Add a recording to the savefile</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>data</code></strong> - string describing the recording</li>
        <li><strong class="pname"><code>filename</code></strong> - filename to be used in archive</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="ListRecordings"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">ListRecordings</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.ListRecordings">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>List all recordings in savefile</p>
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>array containing filenames of all recordings</dd>
  </dl>
</td></tr></table>
</div>
<a name="LoadRecording"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">LoadRecording</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.LoadRecording">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Get recording data from the savefile.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>name</code></strong> - a filename, aquired with ListRecordings</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>string containing the recording data</dd>
  </dl>
</td></tr></table>
</div>
<a name="_File2String"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_File2String</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tarName</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver._File2String">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Read data from file in savefile to string</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>tarName</code></strong> - filename in savefile</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="Delete"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">Delete</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.Delete">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Delete saveFile, start over fresh. Useful when adding new dicom data 
  to file, since it impossible to remove data from a tarfile Dont forget to
  re-add the XML.</p>
  <p>TODO: this method must fail if recordings are already added, changing 
  the dicom data then won't make sense anyways.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="Reset"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">Reset</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.Reset">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Reset to new, blank temporary file</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="IsTemp"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">IsTemp</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver.IsTemp">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>Are we saving to a temp file right now?</dd>
  </dl>
</td></tr></table>
</div>
<a name="_AddToSaveFile"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_AddToSaveFile</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">path</span>,
        <span class="sig-arg">arcname</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver._AddToSaveFile">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Add a file or dir to the saveFile (tar archive)</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>path</code></strong> - path the file you want to add</li>
        <li><strong class="pname"><code>arcname</code></strong> - alternative name to be used in the archive</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="_SaveHasFile"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_SaveHasFile</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">path</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver._SaveHasFile">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Does the save file contain the file indicated by path?</p>
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>true or false</dd>
  </dl>
</td></tr></table>
</div>
<a name="_ClearTemp"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_ClearTemp</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver._ClearTemp">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_CreateTempFile"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_CreateTempFile</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="headset.util.Saver-pysrc.html#ArchiveSaver._CreateTempFile">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="headset-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >HeaDSET</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    <a href="epydoc-log.html">Generated by Epydoc
    3.0.1 on Wed Feb 25 12:58:00 2009</a>
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
